In many video encoder and decoders, a picture is partitioned into fixed-size macroblocks for which the decoding process is specified. Typically each macroblock covers a picture area of 16×16 samples (also considered pixels) in the luma channel and 8×8 samples in each of the two chroma channels. Other macroblock sizes and luma to chroma ratios may be used. In some video coding standards, a picture may be split into one or several slices where a slice is a sequence of macroblocks.
In the H.264/AVC video coding standard, hereinafter H.264, luma and chroma samples of a macroblock are predicted either spatially (intra prediction) or temporally (inter prediction), and the prediction residual is encoded using transform coding. To exploit spatial correlation among pixels, H.264 defines several intra prediction modes: nine 4×4 intra luma prediction modes, nine 8×8 intra luma prediction modes (FRExt profile only), four 16×16 intra luma prediction modes, and four chroma prediction modes. It is desirable for the encoder to use the intra prediction mode that yields the smallest prediction cost, typically in a rate-distortion sense, among all the modes. Hence, the mode-selection process is time consuming if the encoder examines the cost of each of the intra prediction modes one-by-one.
Additionally, the H.264 standard allows intra prediction in inter coded slices. For a macroblock in an inter slice, the chance that an intra mode yields a lower prediction cost than inter prediction is very small. However, the encoder would still have to examine the cost of each of the intra prediction modes and compare them with the cost of inter prediction. Since there are so many different intra prediction modes, it is very inefficient and time consuming to examine the cost of each mode.
Efficient methods and systems for prediction-mode selection are desirable.